<?php
/**
 * GeryEngine
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this release in the file LICENSE
 *
 * @copyright  Copyright (c) 2007 Arjen Brouwer
 * @license    New BSD License
 * @author     Arjen Brouwer
 */

class GeryMacroContext extends AbstractGeryContext {
	
	private $context;
	
	public function __construct(IGeryContext $innerContext) {
		parent::__construct($innerContext);
		
		$this->context = new HashMap();
	}
	
	public function &internalGet($key) {
		return $this->context->get($key);
	}
	
	public function internalPut($key, $value) {
		return $this->context->put($key, $value);
	}
	
	public function internalGetKeys() {
		$this->context->getKeys();
	}
	
	public function internalRemove($key) {
		$this->context->remove($key);
	}
	
	public function internalContainsKey($key) {
		return $this->context->containsKey($key);
	}
	
	/**
	 * @todo dit moet nog netjes opgelost worden
	 * @param unknown_type $vars
	 */
	public function local($vars) {
		foreach ($vars as $name) {
			$this->internalPut($name, '');
		}
	}
}